package szc.common.code.enums;

import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;

import java.util.Arrays;
import java.util.List;

/**
 * @desc 文件类型枚举
 * @author songzc
 * @date 2022/6/18
 */
@Getter
@AllArgsConstructor
public enum FileTypeEnum {

    HTML(".html", null, "<!-", "->"),

    XML(".xml", null, "<!--", "-->"),

    JS(".js", "//", "/*", "*/"),

    JSP(".jsp", "//", "<%--", "--%>"),

    JAVA(".java", "//", "/*", "*/"),

    IOS(".java", "//", "/*", "*/"),

    SWIFT(".swift", "//", "/*", "*/"),

    ASPX(".aspx", null, "<%", "%>"),

    /**
     * Objective-C.H
     */
    OBJECTIVE_C_H(".h", "//", "/*", "*/"),
    /**
     * Objective-C.m
     */
    OBJECTIVE_C_M(".m", "//", "/*", "*/"),
    /**
     * Objective-C.mm
     */
    OBJECTIVE_C_MM(".mm", "//", "/*", "*/"),

    C(".c", "//", "/*", "*/"),

    /**
     * C#
     */
    CS(".cs", "//", "/*", "*/"),

    /**
     * C++
     */
    CPP(".cpp", "//", "/*", "*/"),

    GO(".go",  "//", "/*", "*/"),

    PHP(".php",  "//", "/*", "*/"),

    PYTHON(".py", "#","'''", "'''");


    /**
     *  后缀名
     */
    private final String suffix;

    /**
     *  单行注释语法
     */
    private final String singleComment;

    /**
     *  多行注释开始
     */
    private final String startComment;

    /**
     *  多行注释结束
     */
    private final String endComment;

}
